LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional

LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCASE_NAME := $(shell echo $(TARGET_DEVICE) | tr A-Z a-z)
LOCASE_TARGET_MODEL := $(shell echo $(TARGET_MODEL) | tr A-Z a-z)
LOCASE_TARGET_PRODUCT := $(shell echo $(TARGET_PRODUCT) | tr A-Z a-z)

#add sui
LOCAL_STATIC_JAVA_LIBRARIES := com.lge.sui libSettingsEx

LOCAL_JAVA_LIBRARIES += com.lge.lgdrm

#gesture sensor
LOCAL_JAVA_LIBRARIES += com.lge.core

# add prada ui
# MODEL_PRADA := ku5400 lu5400 p940 su540 
# ifneq ($(filter $(LOCASE_NAME), $(MODEL_PRADA)), )
ifneq ($(filter CAPP_PRADAUI, $(CAPP_FEATURES)), )
LOCAL_RESOURCE_DIR += $(wildcard $(LOCAL_PATH)/overlay/res_p2)
LOCAL_RESOURCE_DIR += vendor/lge/frameworks/sui/overlay/res_p2
endif

ifeq ($(TARGET_PRODUCT),d1lv_VZW_US)
LOCAL_RESOURCE_DIR += $(wildcard $(LOCAL_PATH)/overlay/res_d1lv)
endif

# add kr
ifeq ($(TARGET_COUNTRY),KR)
LOCAL_RESOURCE_DIR += $(wildcard $(LOCAL_PATH)/overlay/res_kr)
endif

# add US VZW
ifeq ($(TARGET_CARRIER),VZW)
LOCAL_RESOURCE_DIR += $(wildcard $(LOCAL_PATH)/overlay/res_vzw)
endif

# add Mexico TCL
ifeq ($(TARGET_CARRIER),TCL)
LOCAL_RESOURCE_DIR += $(wildcard $(LOCAL_PATH)/overlay/res_tcl)
endif

# add SPR(BM)
MODEL_SPRINT := BM SPR
ifneq ($(filter $(TARGET_CARRIER), $(MODEL_SPRINT)), )
LOCAL_RESOURCE_DIR += $(wildcard $(LOCAL_PATH)/overlay/res_bm)
endif

# Model resource
LOCAL_RESOURCE_DIR += $(wildcard $(LOCAL_PATH)/overlay/res_$(PRODUCT_DEVICE))
LOCAL_RESOURCE_DIR += $(wildcard $(LOCAL_PATH)/overlay/res_$(TARGET_DEVICE))

# Model_Carrier resource
LOCAL_RESOURCE_DIR += $(wildcard $(LOCAL_PATH)/overlay/res_$(TARGET_DEVICE)_$(TARGET_CARRIER))

# Model_Carrier_Country resource
LOCAL_RESOURCE_DIR += $(wildcard $(LOCAL_PATH)/overlay/res_$(TARGET_DEVICE)_$(TARGET_CARRIER)_$(TARGET_COUNTRY))

##########################################################################
#pradeep.gk,3/12/2012,Added for changing AlarmClock item layout
ifeq ($(TARGET_COUNTRY),AME)
LOCAL_RESOURCE_DIR += $(wildcard $(LOCAL_PATH)/overlay/res_ame)
endif
##########################################################################

# add qHD
ifneq ($(filter CAPP_QHD, $(CAPP_FEATURES)), )
LOCAL_RESOURCE_DIR += $(wildcard $(LOCAL_PATH)/overlay/res_qHD)
endif

# specify default resource
LOCAL_RESOURCE_DIR += vendor/lge/frameworks/sui/res $(LOCAL_PATH)/res 
LOCAL_AAPT_FLAGS := --auto-add-overlay
LOCAL_AAPT_FLAGS += --extra-packages com.lge.sui.widget

LOCAL_PACKAGE_NAME := LGAlarmClock
LOCAL_OVERRIDES_PACKAGES := DeskClock

include $(BUILD_PACKAGE)

include $(call all-makefiles-under,$(LOCAL_PATH))
